﻿<!-- #Include File = "Channel_Article.asp" -->
<%
Vid = Trim(Request("id"))
if Vid = "" Then
	Call Format_Redirect(InstallDir & ChannelDir)
	Response.End()
End if
strFileName = "View.asp"
Select Case Web_IsCreatIndexShow
Case True
	IndexFile = InstallDir & Web_IndexShowFile
Case Else
	IndexFile = InstallDir & IndexShow
End Select
Select Case ChannelIsCreateHtml
Case True
	ChannelIndexFile = InstallDir & ChannelDir & "/Index" & ChannelHtmlExtName
Case Else
	ChannelIndexFile = InstallDir & ChannelDir & "/Index.asp"
End Select
sqlView = "Select * From " & ChannelDataName & " Where ChannelID=" & ChannelID & " and Hidden=" & WK_True & " And IsDelete=" & WK_False & " and id=" & Vid & " Order By OrderID Desc,ID Desc"
Call Exe_Conn(rsView,sqlView,1)
If rsView.BOF And rsView.EOF Then
	rsView.Close
	Set rsView = Nothing
	Call Format_Redirect(ChannelIndexFile)
	Response.End()
Else
	Cid = rsView("ClassID")
	Title = rsView("Title")
	SEOTitle = rsView("SEOTitle")
	SEOKeyWord = rsView("SEOKeyWord")
	SEODescript = rsView("SEODescript")
	HtmlFileDate = rsView("HtmlFileDate")
	Mobanid = rsView("Moban")
	Skinid = rsView("SkinID")
	TemplateID = rsView("TemplateID")
	StrShowPath = "·您的位置：<a href='"&IndexFile&"' class='LinkPath'>本站首页</a>&nbsp;&gt;&nbsp;<a href='"&ChannelIndexFile&"' class='LinkPath'>"&ChannelTit&"首页</a>"&ShowPath(Cid)&"&nbsp;&gt;&nbsp;"&Title&""
	rsView.Close
	Set rsView = Nothing
End If
sqlClass = "select * from Class where ChannelID=" & ChannelID & " And ClassID=" & Cid & " Order By ClassOrder Asc,ClassID Asc"
Call Exe_Conn(rsClass,sqlClass,1)
If rsClass.eof And rsClass.bof Then
	rsClass.Close
	Set rsClass = Nothing
Else
	HtmlFileDir = rsClass("HtmlFileDir")
	rsClass.Close
	Set rsClass = Nothing
End If
If ChannelIsCreateHtml = True Then
	Dim TmpCls
	Set TmpCls = New Cls_FileSystem
	If TmpCls.Chk_Exist(InstallDir & ChannelDir & "/" & HtmlFileDir & ShowDatePath(HtmlFileDate, ChannelHtmlPath) & ReadFileName(HtmlFileDate, Vid, ChannelHtmlExtName, ChannelHtmlPrefix, ChannelHtmlForm, ""),1) Then
		Response.Redirect(InstallDir & ChannelDir & "/" & HtmlFileDir & ShowDatePath(HtmlFileDate, ChannelHtmlPath) & ReadFileName(HtmlFileDate, Vid, ChannelHtmlExtName, ChannelHtmlPrefix, ChannelHtmlForm, ""))
	Else
		Response.Write "&#25991;&#20214;&#27809;&#26377;&#29983;&#25104;&#65292;&#26080;&#27861;&#35775;&#38382;"
	End If
	Set TmpCls = Nothing
Else
	Call ShowChannelView(Vid,False)
End If
If IsConn = False Then Call CloseConn()
%>